package com.gouqi.mall.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @author xiaofei
 * @date:2020-04-25
 * @description:企业生产的产品
 */
@Data//注在类上，提供类的get、set、equals、hashCode、canEqual、toString方法
@AllArgsConstructor//提供类的全参构造
@NoArgsConstructor
@ApiModel(value = "企业生产的产品")
public class EnterpriseProduct extends ValueObject {
    @ApiModelProperty(value = "产品id")
    private Integer id;
    @ApiModelProperty(value = "产品名称")
    private String name;
    @ApiModelProperty(value = "创始人")
    private String founder;
    @ApiModelProperty(value = "电话")
    private String cellphone;
    @ApiModelProperty(value = "座机")
    private String telephone;
    @ApiModelProperty(value = "生产地址")
    private String productAddress;
    @ApiModelProperty(value = "品牌商标")
    private String brandTradeMark;
    @ApiModelProperty(value = "商标图标")
    private String tradeMark;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @ApiModelProperty(value = "注册时间,注册时间，格式：yyyy-MM-dd HH:mm:ss",example="2020-04-01 15:59:30")
    private String registerTime;
    @ApiModelProperty(value = "注册地址")
    private String registerAddress;
    @ApiModelProperty(value = "营业执照")
    private String businessLicense;
    @ApiModelProperty(value = "食品安全许可证")
    private String foodSafetyPermit;
    @ApiModelProperty(value = "是否下架")
    private Boolean takeoff;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    @ApiModelProperty(value = "下架时间,下架时间，格式：yyyy-MM-dd HH:mm:ss",example="2020-04-01 15:59:30")
    private String takeoffTime;
    @ApiModelProperty(value = "下架原因")
    private String takeoffReason;
    @ApiModelProperty(value = "审核状态【1：通过，2：不通过，3：审核失败】")
    private String approval;
    //@JsonIgnore
    @ApiModelProperty(value = "产品的生产企业")
    private Enterprise company;
}
